import React from 'react';
import { connect } from 'dva';
import PropTypes from 'prop-types'
import { Table , Modal, Menu, Icon, Pagination, Button, size} from 'antd'
import Query from './Query'
import Toggles from '../../components/Toggles'
import styles from './index.less';
import classnames from 'classnames'
import { Link } from 'dva/router'
import DropOption  from '../../components/DropOption/DropOption'

const confirm = Modal.confirm
//分页
const onChange=(pageNumber)=> {
  console.log('Page: ', pageNumber);
}

//表
const rowSelection = {

};
function List ({
  user: {
    list,
    load
  },
  onSearch,
  onDeleteItem,
  onEditItem,
  location
  }) {

    const columns = [{
      title: '账单信息名称',
      dataIndex: 'information',
       width: 100,
      render: text => <a href="#">{text}</a>,
    },{
      title: '客 户',
      dataIndex: 'custerm',
       width: 190,
    },{
      title: '客户编号',
      dataIndex: 'number',
       width: 60,
    },{
      title: '账单日',
      dataIndex: 'bill',
      width: 50,
    },{
      title:'付款方',
      dataIndex: 'payer',
      width: 80,
    },{
      title:'约定到款日',
      dataIndex: 'toDate',
      width: 70,
    },{
      title:'约定工资发放日',
      dataIndex: 'salaryRelease',
      width: 90,
    },{
      title:'社保纳入应收总额',
      dataIndex: 'social',
    width: 100,
    },{
      title:'公积金纳入应收总额',
      dataIndex: 'providentFund',
     width: 110,
    },{
      title:'工资纳入应收总额',
      dataIndex: 'salary',
     width: 100,
    },{
      title:'个税纳入应收总额',
      dataIndex: 'tax',
      width: 100,
    },{
      title:'创建人',
      dataIndex: 'founder',
      width: 60,
    },{
      title:'创建时间',
      dataIndex: 'creatTime',
      width: 80,
    },{
      title:'变更人',
      dataIndex: 'changePertion',
      width: 50,
    },{
      title:'变更时间',
      dataIndex: 'changeTime',
      width: 80,
    },{
      title:'是否有效',
      dataIndex: 'valid',
      width: 60,
    }
  ];

    const data = [{
      information: '易靚社保账单',
      custerm:'上海翼汇投资咨询有限公司',
      number:'W00939',
      bill:'20',
      payer:'易靓贸易',
      toDate:'25',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
    {
      information: '世深社保账单',
      custerm:'上海世深信息科技有限公司',
      number:'W00672',
      bill:'20',
      payer:'上海世深',
      toDate:'28',
      salaryRelease:'15',
      social:'是',
      providentFund:'是',
      salary:'是',
      tax:'是',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'杨军丽',
      changeTime:'2013-06-07',
      valid:'是',
    },
    {
      information: '易靚社保账单',
      custerm:'上海翼汇投资咨询有限公司',
      number:'W00939',
      bill:'20',
      payer:'易靓贸易',
      toDate:'25',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
     {
      information: '出颖社保账单',
      custerm:'上海出颖信息技术有限公司',
      number:' W00529 ',
      bill:'20',
      payer:' 上海出颖 ',
      toDate:'28',
      salaryRelease:'15',
      social:'是',
      providentFund:'是',
      salary:'是',
      tax:'是',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
    {
      information: '白茶服饰店社保公积金账单',
      custerm:' 南京市鼓楼区香之衣恋服饰店 ',
      number:' W00928 ',
      bill:'23',
      payer:'昆山市玉山镇白茶服饰店',
      toDate:'25',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-12-29',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
     {
      information: '佩雷罗社保账单',
      custerm:'佩雷罗贸易（上海）有限公司',
      number:' W00949 ',
      bill:'20',
      payer:'佩雷罗贸易',
      toDate:'15',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'是',
      tax:'是',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'周洁',
      changeTime:' 2014-01-24 ',
      valid:'是',
    },
    {
      information: '易靚社保账单',
      custerm:'上海翼汇投资咨询有限公司',
      number:'W00939',
      bill:'20',
      payer:'易靓贸易',
      toDate:'25',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
    {
      information: '翼汇社保账单',
      custerm:'上海翼汇投资咨询有限公司',
      number:'W00843',
      bill:'20',
      payer:'翼汇投资',
      toDate:'30',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
    {
      information: '我享我家社保账单',
      custerm:'我享我家家居用品有限公司',
      number:' W00864 ',
      bill:'20',
      payer:'我享我家',
      toDate:'30',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-12-16',
      changePertion:'',
      changeTime:'',
      valid:'否',
    },
    {
      information: '哈喽社保账单',
      custerm:' 上海哈喽实业有限公司 ',
      number:' W00990 ',
      bill:'20',
      payer:'哈喽实业',
      toDate:'25',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
     {
      information: '华美社保账单',
      custerm:'华美瑰宝（上海）化妆品商贸有限公司',
      number:'W00439',
      bill:'15',
      payer:'华美瑰宝',
      toDate:'15',
      salaryRelease:'15',
      social:'是',
      providentFund:'是',
      salary:'是',
      tax:'是',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'马颜杰',
      changeTime:'2013-06-18',
      valid:'是',
    },
    {
      information: '道奇社保账单',
      custerm:'道奇（福建）制鞋有限公司',
      number:'W00555',
      bill:'20',
      payer:'道奇（福建）',
      toDate:'15',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'马颜杰',
      changeTime:' 2013-06-18 ',
      valid:'是',
    },
    {
      information: '同捷社保账单',
      custerm:'上海同捷科技股份有限公司',
      number:' W00643 ',
      bill:'20',
      payer:'同捷科技',
      toDate:'28',
      salaryRelease:'0',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'否',
      founder:'',
      creatTime:'2011-11-24',
      changePertion:'',
      changeTime:'',
      valid:'是',
    },
    {
      information: '天津顺华社保账单',
      custerm:'天津顺华物流有限公司',
      number:'W00806',
      bill:'17',
      payer:' 天津顺华物流有限公司 ',
      toDate:'30',
      salaryRelease:'30',
      social:'是',
      providentFund:'是',
      salary:'否',
      tax:'是',
      founder:'',
      creatTime:'2011-11-26',
      changePertion:'',
      changeTime:'',
      valid:'是',
    }
  ];

  return (
    <div className="content-inner">
      <Toggles name='查询条件'>
        <Query onOk={onSearch} />
      </Toggles><br/>
       <div style={{textAlign:'right'}}>
        <Button style={{ marginRight: 13}}>新增账单信息</Button>
        <Button style={{ marginRight: 13}}>修改账单信息</Button>
        <Button style={{ marginRight: 13}}>作废</Button>
        <Button style={{ marginRight: 13}}>删除</Button>
        <Button style={{ marginRight: 13}}>查看</Button>
        <Button style={{ marginRight: 13}}>导出</Button>
       </div><br/>
        <Table rowSelection={rowSelection} columns={columns} dataSource={data} pagination={false} bordered scroll={{ x: '110%', y: 470 }}/><br/>
        <div span={24} style={{textAlign:'right'}}>
        <Pagination showQuickJumper defaultCurrent={2} total={500} onChange={onChange} />
        </div>
    </div>

  );
}

List.propTypes = {
  user: PropTypes.object.isRequired,
  onDeleteItem: PropTypes.func.isRequired,
  onEditItem: PropTypes.func.isRequired
};

export default List;
